package com.example.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class Activityvx extends AppCompatActivity {
    TextView textView1,textView2;

    Button button;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_vx);

        // 接收Myadapter2的传值
        textView1=findViewById(R.id.textViewvx1);
        textView2=findViewById(R.id.textViewvx2);
        Intent intent=getIntent();
        textView1.setText(intent.getStringExtra("name"));
        textView2.setText(intent.getStringExtra("song"));

        // 退回fragment1的列表界面
        button=findViewById(R.id.button5);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }

}
